package com.lbg.drug.commont.untils;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 *
 * @Date: 2022/02/15
 */
@Data
public class BaseRequestDto {
    /**
     * 页码
     */
    @TableField(exist = false)
    @NotNull(message = "页码不能为空 ")
    @ApiModelProperty(value = "页码", required = true)
    private Integer pageNo;

    /**
     * 当前页条数
     */
    @TableField(exist = false)
    @NotNull(message = "当前页条数不能为空")
    @ApiModelProperty(value = "当前页条数", required = true)
    private Integer pageSize;

    /**
     * 起始条数(前端不用管)
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "起始条数(前端不用管)",required = false,hidden=true)
    private Integer currIndex;

    /**
     * 最终条数(前端不用管)
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "最终条数(前端不用管)",required = false,hidden=true)
    private Integer endIndex;

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setCurrIndex(Integer currIndex) {
        this.currIndex = currIndex;
    }

    public void setEndIndex(Integer endIndex) {
        this.endIndex = endIndex;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public Integer getCurrIndex() {
        return currIndex;
    }

    public Integer getEndIndex() {
        return endIndex;
    }
}
